package com.ysf.cn.mainshi.test;

import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @author ysf
 * @date 2020/2/23 14:41
 */
public class MyMethodInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        //System.out.println("======插入前置通知========");
        Object object=methodProxy.invokeSuper(o,objects);
        //System.out.println("======插入后者通知========");

        return null;
    }
}
